package ${package}.model.entity;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yvon.boot.mybatis.model.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

<#if hasBigDecimal>
import java.math.BigDecimal;
</#if>

/**
 * ${tableRemark} 实体类
 *
 * @author : ${author}
 * @since : ${date}
 */
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "${tableName}")
@TableName("${tableName}")
public class ${className} extends BaseEntity implements Serializable {
<#if columns??>
    <#list columns as column>
        <#if column.columnName == 'id' || column.columnName == 'create_by' || column.columnName == 'create_date' || column.columnName == 'update_by' || column.columnName == 'update_date'>
        <#else>
    /**
     *<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}</#if>
     */
    @Column(columnDefinition = "comment '<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}</#if>'", <#if column.columnKey = 'UNI'>,unique = true</#if><#if column.istNotNull && column.columnKey != 'PRI'>,nullable = false</#if>)
    private ${column.columnType} ${column.changeColumnName};
        </#if>
    </#list>
</#if>

}